﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
    class CalculatorTT
    {
        double KQ;
        double h;

        
        double Pi=3.14;
        double r;

        public double R1
        {
            get { return r; }
            set { r = value; }
        }
        public double H
        {
            get { return h; }
            set { h = value; }
        }
        public void NhapDuLieu()
        {
            Console.Write("nhap chieu cao: ");
            h = Convert.ToSingle(Console.ReadLine());
            Console.Write("nhap ban kinh: ");
            r = Convert.ToSingle(Console.ReadLine());
        }
        public double DienTichXungQuanh()
        {
            KQ = 2 * Pi * r * h;
            return KQ;
        }
        public double DienTichToanPhan()
        {
            KQ = 2 * Pi * r * (r + h);
            return KQ;
        }
        public double TheTich()
        {
            KQ = Pi * Convert.ToSingle(Math.Pow(r, 2)) * h;
            return KQ;
        }
    }
}
